<?php
date_default_timezone_set('Australia/ACT');
echo get_magic_quotes_gpc();
echo "\n";
echo date("Y-m-d H:i:s");
echo "\n";

echo date_default_timezone_get();

  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/

  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/


  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/


  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/



  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/




  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/




  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/




  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/




  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/













  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/















  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/


















  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/




















  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/


















  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/



















  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/












  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/


















  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
















  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/












  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/












  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/

















  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/














  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/














  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/













  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/













  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/















  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/  
  
  
  /*require_once dirname(__FILE__) . '/includes/common.inc.php';
  require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';

header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=NYC2010.01.01-2010.08.01支出.xls");


  //require_once dirname(__FILE__) . '/includes/pdoorm.inc.php';
  
  
  $sql="SELECT LEFT(FROM_UNIXTIME(payDate),10) as payDate, LEFT(FROM_UNIXTIME(createdDate),10) AS createdDate,payee,particular,amount,method,chequeNumber,note FROM ns_expense WHERE `status` != '-1' AND LEFT(FROM_UNIXTIME(payDate),10) BETWEEN '2010-01-01' and '2010-08-01' ORDER BY payDate";
  $dataarr = getall($sql,1);
  echo"<table border='1'><tr>";
  echo   "<td>payDate</td>";
  echo   "<td>createdDate</td>";
  echo   "<td>payee</td>";
  echo   "<td>particular</td>";
  echo   "<td>amount</td>";
  echo   "<td>method</td>";
  echo   "<td>Q/N</td>";
  echo   "<td>note</td>";
  echo  "</tr>";  

  if(is_array($dataarr))
  {
  	foreach ($dataarr as $dr)
  	{
       echo" <tr>";  	   
	   echo   "<td>".$dr['payDate']."</td>";
	   echo   "<td>".$dr['createdDate']."</td>";
	   echo   "<td>".$dr['payee']."</td>";
	   echo   "<td>".$dr['particular']."</td>";
	   echo   "<td>".$dr['amount']."</td>";
	   echo   "<td>".$dr['method']."</td>";
	   echo   "<td>".$dr['chequeNumber']."</td>";
	   echo   "<td>".$dr['note']."</td>"; 
       echo  "</tr>";  	   
  	}
  }
  echo"</table>";*/
  
  phpinfo();
  
  
?>
